# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=qtav
pkgver=1.12.0
pkgrel=1
pkgdesc="A cross-platform multimedia playback framework based on Qt and FFmpeg"
arch=('i686' 'x86_64')
url="http://www.qtav.org/"
license=('LGPL')
depends=('qt5-declarative' 'ffmpeg' 'libxv' 'openal' 'uchardet' 'desktop-file-utils'
         'qt5-quickcontrols' 'qt5-svg')
source=("$pkgname-$pkgver.tar.gz::https://github.com/wang-bin/QtAV/archive/v$pkgver.tar.gz")
sha512sums=('f273d10a4fe9126cd7d7b1293c087527bf898513e8add7958d905b6039b0c9c3891ea751c40e4c13ba683febff73912322953b151a131726ef8b44db199e0f32')

prepare() {
  cd QtAV-$pkgver
  # fix mkspecs install dir
  sed -e 's|\$\$\[QT_INSTALL_BINS\]\/\.\.\/mkspecs|\$\$\[QT_INSTALL_ARCHDATA\]\/mkspecs|g' -i tools/install_sdk/install_sdk.pro
}

build() {
  cd QtAV-$pkgver

  qmake-qt5 "CONFIG+=no_rpath recheck"
  make
}

package() {
  cd QtAV-$pkgver

  make INSTALL_ROOT="${pkgdir}" install
}
